package com.cyl.h5.domain.vo;

import com.cyl.manager.oms.domain.entity.OrderItem;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Objects;

@Data
public class H5OrderInfoVO {


    @ApiModelProperty(value = "商品id", required = true)
    private Long productId;

    @ApiModelProperty(value = "订编号", required = true)
    private String orderNum;

    @ApiModelProperty("商品名")
    private String productName;

    @ApiModelProperty(value = "商品数量", required = true)
    private Integer productCount;

    @ApiModelProperty(value = "联系人", required = true)
    private String contactUserName;

    @ApiModelProperty(value = "联系电话", required = true)
    private String contactPhone;

    @ApiModelProperty(value = "单位名称", required = true)
    private String companyName;

    @ApiModelProperty("标记状态（1:客服未处理，2:客服处理中，3:客服已联系）")
    private Integer markStatus;

    /**
     * 名字
     */
    private String markStatusName;

    public String getMarkStatusName() {
//        return (Objects.equals(markStatus, 1) || Objects.equals(markStatus, 2)) ? "客服处理中" : "客服已联系";
        return (Objects.equals(markStatus, 1) )? "客服待处理" : ((Objects.equals(markStatus, 2) )? "客服已处理":"已发货");
    }

    //    @ApiModelProperty("标记记录")
//    private String markRemarks;
    @JsonFormat(pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;



    @ApiModelProperty("收货地址")
    private String shippingAddress;
}
